package com.bw.doctor.service.impl;
/**
 * @Author：尚志豪
 * @Package：com.bw.system.service.impl
 * @Project：doudi-group2-shixun-02
 * @name：PrivateDoctorServiceImpl
 * @Date：2025/2/24 20:58
 */

import com.bw.doctor.mapper.PrivateDoctorMapper;
import com.bw.doctor.service.PrivateDoctorService;
import com.bw.domain.ConsultationRecord;
import com.bw.domain.Patient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: doudi-group2-shixun-02
 * @description: 私人医生业务逻辑
 * @author: CuiFu Bo
 * @create: 2025-02-24 20:58
 **/
@Service
public class PrivateDoctorServiceImpl implements PrivateDoctorService {
    @Autowired
    private PrivateDoctorMapper privateDoctorMapper;
    /**
     * 查询问诊服务
     */
    @Override
    public List<com.bw.domain.Patient> checkByLoginDoctorId(Long doctorId, Long state) {
        List<com.bw.domain.Patient> patientList = privateDoctorMapper.checkByLoginDoctorId(doctorId, state);
        System.out.println("List<Patient>===" + patientList);
        return patientList;
    }
    /**
     * 通过患者问诊id查询患者详情
     */
    @Override
    public Patient queryPatientInformationByPatientId(Long patientId) {
        return privateDoctorMapper.queryPatientInformationByPatientId(patientId);
    }
    /**
     * 通过患者问诊id查询问诊记录
     */
    @Override
    public List<ConsultationRecord> queryTheConsultationRecordByThePatientsConsultationId(Long patientId) {
        return privateDoctorMapper.queryTheConsultationRecordByThePatientsConsultationId(patientId);
    }
}
